<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="xxx" data-xxx="张三">1111</div>
    <!-- 存值   但是按照规范  data-src   -->
    <script>
        //什么是自定义属性
        //  怎么获取或者修改自定义属性
        let  xxx = document.querySelector(".xxx");
        console.log(xxx.getAttribute("data-xxx")); //获取自定义属性
        xxx.setAttribute("data-xx","李四") //修改自定义属性
        

    </script>
    
</body>
</html>